//
// Created by xili on 2024/8/30 20:46.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int partitionString(string s) {
        unordered_set<char> us;
        int ans = 1;
        for (auto &item: s) {
            if (us.count(item)) {
                ans++;
                us.clear();
            }
            us.insert(item);
        }
        return ans;
    }
};